package com.qpx.jxcmessage.confirm;


import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(value = "RabbitMQConfig-confirm")
public class RabbitMQConfig {


    @Bean
    public Queue queue(){
        return new Queue("queue-confirm-test");
    }

    @Bean
    public Queue queue1(){
        return new Queue("queue-confirm-test1");
    }

    @Bean
    public TopicExchange topicExchange(){
        return new TopicExchange("exchange-confirm-test");
    }


    @Bean
    public Binding binding(){
        return BindingBuilder.bind(queue()).to(topicExchange()).with("confirm.#");
    }
    @Bean
    public Binding binding1(){
        return BindingBuilder.bind(queue1()).to(topicExchange()).with("confirm.#");
    }
}
